package jmine.tec.extensions.impl;

import bancosys.tec.exception.LocalizedMessageHolder;
import bancosys.tec.exception.MessageCreator;
import bancosys.tec.exception.MessageCreatorHelper;

/**
 * @author wagner.tsuchiya
 */
public enum TecExtensionsMessages implements MessageCreator {
    HANDLER_NOT_FOUND_FOR_CLASS(1, "jmine.tec.extensions.impl.forms.server.handler.not.found"),

    INCOMPATIBLE_TYPE_FOR_HANDLER(1, "jmine.tec.extensions.impl.forms.server.handler.incompatible.type"),

    ERROR_CREATING_SERVICE_FOR_FORM(1, "jmine.tec.extensions.impl.forms.error.creating.service.for.form"),

    ERROR_EXECUTING_SERVICE_FOR_FORM(1, "jmine.tec.extensions.impl.forms.error.executing.service.for.form");

    private final MessageCreator delegate;

    /**
     * Construtor
     * 
     * @param nargs nargs
     * @param key key
     */
    private TecExtensionsMessages(int nargs, String key) {
        this.delegate = MessageCreatorHelper.creator("jmine-tec-extensions-impl-messages", key, nargs);
    }

    /**
     * {@inheritDoc}
     */
    public LocalizedMessageHolder create(Object... arguments) {
        return this.delegate.create(arguments);
    }

    /**
     * {@inheritDoc}
     */
    public int getExpectedArguments() {
        return this.delegate.getExpectedArguments();
    }
}
